Skip to content

Conversation

@monicaz010101
Copy link
Contributor

No description provided.

kcarnold and others added 30 commits November 11, 2025 14:24
staging a visual bug to check for CI workflow
…ctor page navigation

## Summary
Addressed 11 of 20 PR review comments by fixing survey questions, removing logging throttles,
extracting constants, and refactoring hardcoded page navigation logic.

## Changes

### Survey Questions (surveyData.ts)
- Add 3 missing TLX dimensions: physical demand, effort, frustration
- Fix debrief text for complete_document condition to clarify AI accuracy expectations
  (chat provides true context, AI suggestions may be inconsistent)

### Logging (TaskPage.tsx)
- Remove document update throttling - now logs every change instead of every 500 characters
- Ensures complete data collection for analysis

### Constants (studyConfig.ts)
- Extract API_TIMEOUT_MS constant (20 seconds) for consistent timeout handling
- Create getNextPage() helper function to replace hardcoded array indices

### Page Navigation Refactoring
Update all 5 page navigation components to use getNextPage() helper:
- ConsentPage, IntroPage, IntroSurvey, StartTaskPage, PostTaskSurvey
- Benefits: self-documenting, maintainable, survives page sequence changes

## Deferred to Backlog
Created 8 new backlog tasks for:
- Consent form placeholders
- Error boundary setup
- Parameter validation (no defaulting condition codes)
- System message configuration strategy evaluation
- WritingArea tests
- Scenario content extraction to studyConfig
- ChatPanel API response format improvement
- AI context enhancement with email metadata

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Added chatMessage:user and chatMessage:assistant event types to LogEventType
- Implemented logging in ChatPanel using studyParamsAtom for username
- Logs capture messageId, content, and timestamp in extra_data
- Moved utility functions (getMessageText, parseMessageContent) to module level
- Logs are sent to backend via existing /api/log endpoint

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants